package eu.orangeflash.webapis.xmlrpc
{
	import flash.events.IEventDispatcher;
	/**
	 *	Interface, IMethodCall instances are representation of method invoked on remote server. It is suggested, 
	 * 	that you do not create them manualy, use <code>IClient.invokeMethod</code> instead.
	 * 
	 * @author	Nirth
	 * 
	 * @url		http://blog.orangeflash.eu
	 */
	public interface IMethodCall extends IEventDispatcher
	{
		function invoke(methodName:String = null, params:Array = null):void;
		
		/**
		 * Property, collection of arguments.
		 * 
		 * @param	value	Array, collection of arguments.
		 * 
		 * @return			Array, collection of arguments.
		 */
		function set params(value:Array):void;
		function get params():Array;
		
		/**
		 * Property, indicates methodName on remote server.
		 * 
		 * @param	value	String, name of operation.
		 * 
		 * @return			String, name of operation.
		 */
		function set methodName(value:String):void;
		function get methodName():String;
		
		/**
		 * Property, indicates <code>IClient</code> instance.
		 * 
		 * @param	value	Instance of IClient.
		 * 
		 * @return			Reference to <code>IClient</code> instance.
		 */
		function set client(value:IClient):void;
		function get client():IClient;
		
		/**
		 * Property Read-Only, returns reference to <code>IMethodResponse</code> instance generated on response.
		 * 
		 * @return			Reference to <code>IMethodResponse</code> instance.
		 */
		function get result():IMethodResponse;		
		
		/**
		 * Property Read-Only, returns raw data recieved from <code>URLLoader.load()</code> request.
		 * 
		 * @return			Raw result of operation.
		 */
		function get data():Object;
	}
}